#/*************************************************************************
#    > File Name: examples/example_ARCH.py
#    > Author: Yan Wang
#    > Mail: wangyan@imnu.edu.cn
#    > Created Time: 2022年06月29日 星期三 23时28分59秒
# ************************************************************************/
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from calc_setting import * 
'''
	original_folder="/home/yancy/Software/MG5/Events_mh_mch_10"
	target_folder="/home/yancy/Software/ARCH_test/Auto_Running/auto_mab/Examples/test_output/MG_folder/MG_Move/Events/"
	Create_Folder(target_folder,"/")
	#Exhibit_Function(Move_MG_Event_MultiRun_for_one_BP, [original_folder, target_folder])
	Move_MG_Event_MultiRun_for_one_BP(original_folder)
'''

# Cal_Parton_Cut_Xection

ARCH_dir=Param_ARCH_Dir(param_dir, process, MG_para)
print("In calc ARCH, the input xections are using the following files:")
print("with cut:", ARCH_dir["cut_file_name"])
print("without cut:", ARCH_dir["nocut_file_name"])
print("theory file:", theoretical_para_file_name)
print("The MG hotmap output files are:", MG_hotmap_out_file)
print("the hotmap variable names are:", MG_hotmap_variable_name)

cut_cross=Cal_Parton_Cut_Xection(ARCH_dir["cut_file_name"], ARCH_dir["nocut_file_name"], theoretical_para_file_name)

para=[process["plot"]["xaxis"],process["plot"]["yaxis"],cut_cross]
Generate_Hotmap_Data_from_List(para,MG_hotmap_out_file,MG_hotmap_variable_name)
Generate_Hotmap_Code(MG_para_plot, template_code=param_dir["example"]+"/test_input/hotmap.C")


# 生成ARCH control 文件参数 
file_name=param_dir["example"]+"test_input/param_file.dat"
ARCH_Control=Param_ARCH_Control(param_dir, process, file_name, MG_para)
Generate_Multi_ARCH_Control_File(cut_cross, ARCH_Control["dir"], ARCH_Control["replaced_para"], process, MG_para)


